package com.aios.action.user.system;

public class SystemUserSwitchUserAction extends AbstractSystemUserAction {

	private static final long serialVersionUID = 1L;

	private String userId;
	
	public String execute() {
		
		if(userId!=null) {
			
			try {
				this.systemUser = systemUserService.findById(userId);
				addSwitchedUserSessionVariable(systemUser);
			} catch (Exception e) {
				e.printStackTrace();
				return INPUT;
			}
			
		} else {
			return INPUT;
		}
		
		return SUCCESS;
		
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	

}
